package com.mrdeer.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mrdeer.user.api.dto.tenant.AccountRoleQueryDTO;
import com.mrdeer.user.api.entity.TenantAccount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author ：xie jianchu
 * @date ：Created in 2020/9/8 0008 9:42
 */
@Repository
public interface TenantAccountMapper extends BaseMapper<TenantAccount> {

    int selectTenantByUsernameInAccount(@Param("username") String username);

    void deleteAccountInTenant(@Param("tenantId") Long tenantId, @Param("accountId") Long accountId);

    AccountRoleQueryDTO selectAccountRole(@Param("username") String username, @Param("roleCode") String roleCode, @Param("tenantId") Long tenantId);
}
